#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using JigLibX.Collision;
using JigLibX.Physics;
using JigLibX.Geometry;
using JigLibX.Math;
using Microsoft.Xna.Framework.Graphics;
using sqengine.Engine.Common;
#endregion

namespace sqengine.PhysicObjects
{

    public class SphereObject : BasicObject
    {

        public SphereObject(Game game, string ObjName, Model model, float radius, Matrix orientation, Vector3 position, float mass, string s_texture)
            : base(game, model, s_texture)
        {
            body = new Body();
            Name = ObjName;
            collision = new CollisionSkin(body);
            collision.AddPrimitive(new Sphere(Vector3.Zero * 5.0f, radius), new MaterialProperties(0.5f, 0.7f, 0.6f));
            body.CollisionSkin = this.collision;
            Vector3 com = SetMass(mass);
            body.MoveTo(position + com, orientation);
            

            // collision.ApplyLocalTransform(new Transform(-com, Matrix.Identity));
            body.EnableBody();
            this.Scale = Vector3.One * radius;
        }

        public override void ApplyEffects(BasicEffect effect)
        {
          

        }

    }
}
